home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
MENUA.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
4KB
|
103 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_MenuA(nMenuTopRow, nMenuLeftCol, nMenuMaxItems, cMenuTitle, cMenuArray,
lMsgDisable, lClkDisable) --> nSelection
PARAMETERS:
nMenuTopRow : Menu Top Left ROW
nMenuLeftCol : Menu Top Left COLUMN
nMenuMaxItems : Maximum number of items on menu at once
cMenuTitle : Menu Title
cMenuArray : Array of Menu Elements
lMsgDisable : Logical - Disable InterApp Messages (Default NO)
lClkDisable : Logical - Disable Clock (Default NO)
(lMsgDisable and lClkDisable are reserved for future use.)
SHORT:
Genral purpose menuing facility.
DESCRIPTION:
_MenuA() is a general purpose menuing facility. It's operation is similar
to _Menu(). In _MenuA(), however, the length of the menu can be specified
and any extra menu items are scrolled through this "window". _Menu()
simply forces the menu size to fit all elements, _MenuA() can display
any number of elements by scrolling the extras "achoice style."
It accepts as a parameter an array of character strings to be used as
menu items. It builds the menu, prompts for a selection and returns
the number of the element selected as it's return value. If ESC is
pressed, it returns ZERO.
nMenuTopRow and nMenuTopLeftCol are the row/col coordinates for the top
left corner of the menu.
nMenuMaxItems is the number of items displayable without scrolling to display
more. It is the number of lines that will appear on the menu. Unlike
_Menu(), _MenuA() fits the menu to the window. This means that any menu
whose elements do not fit within the limits of the given coordinates will
instead of spilling over, scroll within those coordinates. For that reason
it is possible to create "ugly" or inefficient menus by specifying a value
for nMaxItems that is greater than the number of items in the menu array.
(You will end up with a window larger than is necessary to hold the menu
items and will have empty space after the last menu element.)
lMsgDisable, if TRUE, will disable other apps/users messages being presented.
lClkDisable, if TRUE, will disable the real time clock. The real time
clock is specifically placed on the screen to be used with _FScreen(). If
you are not using _FScreen(), you may want to disable the clock.
The most notable difference between _Menu() and _MenuA(), aside from
scrollable menus, is the fact that _MenuA() can receive station messages sent
through the _Kmenu() menu system, whereas _Menu() cannot. _MenuA() polls for
messages upon any menu activity (i.e., when arrow keys are pressed to move
the menu highlight bar).
APPMSG.DAT (the default name for the message file) is NOT created when
the program polls for messages. AppMsg must be manually created, or
created by a call to __InitAppMsg(). The reason for this is to avoid
overhead and unnecessary APPMSG files in apps that are not going to
use inter-application messaging.
See _KMenu() for information on inter-application messaging.
NOTE:
This function is the engine of _KMENU() which manages menu configurations
external to the program (in data files) and makes calls to _MenuA() to
display menus.
EXAMPLE:
LOCAL acMainMenu[5]
acMainMenu[1] = ' Menu Option One '
acMainMenu[2] = ' Menu Option Two '
acMainMenu[3] = ' Menu Option Three '
acMainMenu[4] = ' Menu Option Four '
acMainMenu[5] = ' Menu Option Five '
nMenuOpt = _MenuA(10,10,3,'MAIN MENU','acMainMenu')
Result: A light-bar menu is displayed with the array elements 1 - 3 in
acMainMenu[] as selectable options. The remaining options can be seen by
pressing the up or down arrow keys (also PgUp/ PgDn keys) to get to them.
Once an item is selected, the number of that option is returned as it's
return value.
The TOP LEFT corner of the menu is at ROW 10, COL 10.
******************************************************************************/